<template>
	<div class="singlepage">
		 <header class="classification_t header_fixed" id="title">
      <div class="classification_t_l" @click="goPrev">
            <img src="./../../assets/images/return.png" width="30%">
      </div>
      <div class="classification_t_r">{{$route.query.title}}</div>
    </header>
    <div class="updatepassword_box feedback_box">
        <input type="text" id="phone" placeholder="请输入您的姓名" value="" v-model="param.name" />
    </div>
    <div class="updatepassword_box feedback_box_phone">
        <input type="tel" id="phone" placeholder="请输入您的手机号" value="" v-model="param.phone" />
    </div>
    <div class="joinus_textarea_box">
        <textarea name="" id="" placeholder="请输入您对我们的评价" v-model="param.content"></textarea>
    </div>
    <button class="recharge_btn" @click="pushComment">评价</button>
  </div>
</template>
<script>
import { feedBack } from '@/api/allapis'
export default{
  name: 'Feedback',
  data: function() {
    return {
      param:{
        name:'',//姓名
        phone:'',//手机号
        content:''//内容
      }
    }
  },
  methods:{
    //返回上一页
    goPrev(){
      this.$router.go(-1)
    },
    //提交反馈
    pushComment(){
      feedBack(this.param).then(response=>{
        alert(response.msg)
        this.$router.go(-1)
      })
    },
  }
}
</script>
<style scoped>
.singlepage{padding-top:50px;}
.feedback_box{
  width:95%;margin:0 auto;border:1px solid #ddd;margin-top:10px;margin-bottom:10px;
}
.feedback_box input::placeholder{color: #666}
.feedback_box_phone{
  width:95%;margin:0 auto;border:1px solid #ddd
}
.feedback_box_phone input::placeholder{color: #666}
</style>



